//引入http模块
const http = require("http");

//创建服务
/**
 * request:请求
 * response:响应
 */
http.createServer(function (request, response) {
    //设置响应头
    response.writeHead(200, {"Content-Type": "text/html;charset=utf-8"});
    //设置响应内容
    response.write("你好 node.js  ");
    response.write("你好世界");
    //结束响应
    response.end()

}).listen(8001);

